import java.util.Arrays;
import java.util.Scanner;

public class Test {
    public static void main1(String[] args) {
                Scanner sc = new Scanner(System.in  );
                String p = sc.next();
                String[] t = p.split(" ");
                System.out.println(t[t.length - 1].length());
            }

    public static void main2(String[] args) {
        String s1 = "hello bit";
        System.out.println(s1);

        String s2 = new String("hello bit");
        System.out.println(s2);

        char[] ch = new char[]{'a', 'b', 'c'};
        int[] ch1 = new int[]{1, 2, 3};
        String s3 = new String(ch);
        System.out.println(s3);
        System.out.println(Arrays.toString(ch1));
        String s4 = Arrays.toString(ch1);
        System.out.println(s4);
        String s5 = String.valueOf(123);
        String s6 = String.valueOf(1.23);
        String s7 = String.valueOf(ch1);
        int i = Integer.parseInt(s5);
        System.out.println(i);
//        int i1 = Integer.parseInt(s6);
        System.out.println(s7);
    }

    public static void main11(String[] args) {
        String s1 = new String("hello");
        String s2 = new String(" world");
        String s3 = s1;
        System.out.println(s1 == s2);
        System.out.println(s1 == s3);
        System.out.println(s1.length());
        System.out.println(s1.isEmpty());
    }

    public static void main22(String[] args) {
        String s1 = new String("hello");
        String s2 = new String("hello");
        String s3 = new String("Hello");

        System.out.println(s1 == s2);
        System.out.println(s1 == s3);

        System.out.println(s1.equals(s2));
        System.out.println(s1.equals(s3));
    }

//    public boolean myequals(Object o) {
//        if(this == o) {
//            return true;
//        }
//        if(o instanceof String) {
//            String os = (String) o;
//            int n = value.length;
//            if(n == os.value.length) {
//                char[] ch1 = value;
//                char[] ch2 = os.value;
//                int i = 0;
//                while(n-- != 0) {
//                    if(ch1[i] != ch2[i]) {
//                        return false;
//                    }
//                    i++;
//                }
//                return true;
//
//            }
//        }
//        return false;
//    }

    public static void main33(String[] args) {
        String s1 = new String("abc");
        String s2 = new String("ac");
        String s3 = new String("abu");
        String s4 = new String("abcdef");
        System.out.println(s1.compareTo(s2));
        System.out.println(s1.compareTo(s3));
        System.out.println(s1.compareTo(s4));
    }

    public static void main(String[] args) {
        String s1 = new String("abc");
        String s2 = new String("ac");
        String s3 = new String("ABc");
        String s4 = new String("abcdef");
        System.out.println(s1.compareToIgnoreCase(s2));
        System.out.println(s1.compareToIgnoreCase(s3));
        System.out.println(s1.compareToIgnoreCase(s4));
    }
}
